<?php

/**
 * 
 * @project     : innoTweets 1.0
 * @author      : Dino (DBK)
 * 
 * @package     : Sign Out
 * @description : User sign out mobile
 * 
 */
if (!defined('BASEPATH')) {
  exit('No direct script access allowed');
}

class Signin extends MOBILE_AUTH_Controller {

  public function index() {

    // Checking request type
    if ($this->is_post()) {

      // Siging out using session id
      $signout = $this->user_session_mobile->signout($this->mobile_session_id);

      // Checking signout status
      if ($signout) {
        $this->response['status'] = 1;
        $this->response['message'] = 'Success';
      } else {
        $this->response['message'] = 'Sigout failed';
      }
    } else {
      $this->response['message'] = 'Invalid request';
    }
  }

  public function __destruct() {
    echo json_encode($this->response);
  }

}

?>